package easy4j.framework.example.controller;

import com.google.common.collect.Maps;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * @author bjliuyong
 * @version 1.0
 * @created date 16-8-4
 */
@Controller
@RequestMapping("/req/mapping")
public class RequestMappingController {


    @RequestMapping(params = {"name" ,"iname"} )
    @ResponseBody
    public Object p(String name){
        Map<String,String> j = Maps.newHashMap();
        j.put("name" , name) ;
        return j ;
    }

    @RequestMapping(params = {"iname"} )
    @ResponseBody
    public Object b(String iname){
        Map<String,String> j = Maps.newHashMap();
        j.put("name" , iname) ;
        return j ;
    }

}
